package com.nativetalk.service.three.message;

import com.nativetalk.base.Page;
import com.nativetalk.base.RetInfo;
import com.nativetalk.bean.member.TdNtMember;
import com.nativetalk.bean.message.TdNtMessageInsert;
import com.nativetalk.bean.teacher.TdNtTeacherResult;

import java.util.Map;

/**
 * Created by lizhun on 16/7/6.
 */
public interface MessageService {
    /**
     * @Purpose  学生发消息,老师收消息
     * @version  3.0
     * @author   lizhun
     * @param    tdNtMember
     * @param    type 1:学生发消息，2:老师读取消息
     * @return   RetInfo
     */
    public RetInfo sendMembMessage(TdNtMember tdNtMember, int type,
                                   TdNtMessageInsert tdNtMessageInsert,TdNtTeacherResult tdNtTeacherResult);
    /**
     * @Purpose  教师发消息,学生收消息
     * @version  3.0
     * @author   lizhun
     * @param    tdNtMember
     * @return   RetInfo
     */
    public RetInfo collectMembMessage(TdNtMember tdNtMember, int type,
                                      TdNtMessageInsert tdNtMessageInsert,TdNtTeacherResult tdNtTeacherResult);
    /**
     * @Purpose  查找用户所有未读消息
     * @version  3.2
     * @author   lizhun
     * @update   lizhun
     * @updatePurpose 增加未读系统消息数量
     * @param    tdNtMessageInsert
     * @return   RetInfo
     */
    public RetInfo findMessageSize(TdNtMessageInsert tdNtMessageInsert,int version);
    /**
     * @Purpose  查找用户所有未读消息 列表
     * @version  3.2
     * @author   lizhun
     * @update   lizhun
     * @updatePurpose 新增未读系统消息数量及最新一条系统消息标题
     * @param    map
     * @return   RetInfo
     */
    public RetInfo findMessagePage(Map<String, Object> map,int version);
    /**
     * @Purpose  获取系统消息列表
     * @version  3.2
     * @author   lizhun
     * @param    page
     * @return   RetInfo
     */
    public RetInfo findSystemMessage(Page page);
}
